
* Null-model 
melogit PRRvote i.gender || cntry: 
estimates store model1
estat icc
estat ic

** Adding control variables to Null-model (but not masculine culture)
melogit PRRvote i.gender st_lrscale st_allowim st_index_discontent_scaled st_education st_age st_religious || cntry: 
estimates store model2
estat icc
estat ic

*** Adding masculine culture, but not interaction between gender and masculine culture 
melogit PRRvote i.gender c.st_index_mas_level2 st_lrscale st_allowim st_index_discontent_scaled st_education st_age st_religious || cntry: st_index_mas_level2 
estimates store model3
estat icc
estat ic

**** Adding interaction between gender and masculine culture 
melogit PRRvote gender##c.st_index_mas_level2 st_lrscale st_allowim st_index_discontent_scaled st_education st_age st_religious || cntry: st_index_mas_level2  
estimates store model4
estat icc
estat ic

**** Adding country-level controls 
melogit PRRvote gender##c.st_index_mas_level2 st_lrscale st_allowim st_index_discontent_scaled st_education st_age st_religious st_per601 prr_gov || cntry: st_index_mas_level2  
estimates store model5
estat icc
estat ic
	
********************** Margins and marginsplot  *********************
*********************************************************************

* Marginal effects of gender - by level of masculine culture - used in paper!
margins, dydx(i.gender) at(st_index_mas_level2=(-2(0.25)2))
marginsplot, ///
    xdimension(st_index_mas_level2) ///
    recast(line) ///
    plot1opts(lpattern(solid) lcolor(black)) ///
    ci1opts(lpattern(solid) lcolor(black)) ///
    yline(0, lpattern(dash))
	
* predicted probabilities for Women vs Men across levels of masculine culture 
margins i.gender, at(st_index_mas_level2=(-2(0.25)2))

marginsplot
, xdimension(st_index_mas_level2) recast(line) recastci(rcap) ///
    title("Predictive margins of gender with 95% CIs") ///
    legend(order(1 "Women" 2 "Men")) ///
    plot1opts(lpattern(dash) lcolor(black)) ///
    ci1opts(lcolor(black)) ///
    plot2opts(lpattern(solid) lcolor(black)) ///
    ci2opts(lcolor(black))
	
* create cntry_num
encode cntry, gen(cntry_num)
label variable cntry_num "Country"

* Marginal effect (contrasts) of gender by country
margins, dydx(i.gender) over(cntry_num)

marginsplot, ///
    yline(0, lpattern(dash)) ///
    recast(line) ///
    ciopts(lcolor(black)) ///
    plotopts(lcolor(black)) ///
    ytitle("Contrasts on predicted probability") ///
    xtitle("Country")

	



	
	
	
	
	

	


	




	

